<!doctype html>
<html class="no-js" lang="">

<head>
  <meta charset="utf-8">
  <meta http-equiv="x-ua-compatible" content="ie=edge">
  <title>修改密码</title>
  <meta name="description" content="">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <link rel="manifest" href="../site.webmanifest">
  <link rel="apple-touch-icon" href="../icon.png">
  <!-- Place favicon.ico in the root directory -->

  <link rel="stylesheet" href="../static/css/normalize.css">
  <link rel="stylesheet" href="../static/css/main.css">
  <link rel="stylesheet" href="../static/css/index.css">
  <link rel="stylesheet" href="../../static/assets/css/zeroModal.css">
</head>

<body>
  <!--[if lte IE 9]>
    <p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="https://browsehappy.com/">upgrade your browser</a> to improve your experience and security.</p>
  <![endif]-->

  <!-- Add your site or application content here -->

  <div class="header">
    <div class="header-container">
         <div class="title" >
          <a href="../index.html"><img src="../static/img/title.png" style="height: 65px;"></a>
        </div>
      <ul class="info">
        <li id="header-username">
          <img src="../static/img/user.png" alt="">
          <a id="header-username" href="/login.html">登录</a>
        </li>
        <li>
          <img src="../static/img/config.png" alt="">
          <a href="./settings.html">设置</a>
        </li>
        <li>
          <img src="../static/img/message.png" alt="">
          <a href="./message.html">站内信</a>
        </li>
        <li>
          <a class="exit" onclick="doLogout()">退出</a>
        </li>
      </ul>
    </div>
  </div>

  <div class="main">
    <div class="container-box login">
      <div class="container-box-title">
        <img src="../static/img/title2.png" alt="">
      </div>

      <div class="title">
        <img src="../static/img/forget.png" alt="">修改密码
      </div>

      <div class="form">
        <div class="form__item">
          <label for="">账号</label>
          <input type="text" name="account">
        </div>
        <div class="form__item">
          <label for="">新密码</label>
          <input type="text" name="newPassword">
        </div>
        <div class="form__item">
          <label for="">确认新密码</label>
          <input type="text" name="repeatNewPassword">
        </div>
        <div class="form__item">
          <label for="">旧密码</label>
          <input type="text" name="oldpassword">
        </div>
      </div>

      <div class="actions">
        <button class="primary-btn" id="submit">提交</button>
        <button class="primary-btn" id="forget-submit">忘记密码</button>
      </div>
    </div>

  </div>

  <div class="footer">
    <p>作者</p>
    <p>地址：</p>
    <p>邮政编码：250000 技术支持：</p>
  </div>

  <script src="../static/js/modernizr-3.6.0.min.js"></script>
  <script src="../static/js/jquery-1.12.min.js"></script>
  <script src="../static/js/plugins.js"></script>
  <script src="../static/assets/scripts/zeroModal.min.js"></script>
  <script src="../static/js/main.js"></script>
  <script>
    document.getElementById('submit').addEventListener('click', function () {
      var inputs = document.querySelectorAll('input');

      var data = {};
      inputs.forEach(function (item) {
        console.log(item);
        data[item.getAttribute('name')] = item.value;
      })

      console.log(data);
      request({
        url: API_DOMAIN + 'culture/cultrueUser/changepwd',
        data: data,
        success: function (result) {
          console.log(result)
        }
      })
    })

    document.getElementById('forget-submit').addEventListener('click', function () {
      window.location.href = '/forget.html';
    })
  </script>
</body>

</html>